package com.qd.common.panda.domain.entity.card.collect;

import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import com.cdqidi.valid.group.DeleteGroup;
import com.cdqidi.valid.group.UpdateGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;


/**
 * 卷封面
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class CollectCardCoverDTO extends BaseQuery {
    /**
     * 主键
     */
    @NotBlank(message = "领劵ID不能为空", groups = {DeleteGroup.class, UpdateGroup.class})
    @Size(max = 50, message = "领劵ID长度不能超过{max}位", groups = {DeleteGroup.class, UpdateGroup.class})
    private String cid;
    /**
     * 上图片
     */
    @NotBlank(message = "上图片不能为空", groups = DefaultGroup.class)
    @Size(max = 200, message = "上图片长度不能超过{max}位", groups = DefaultGroup.class)
    private String pic;
    /**
     * 中图片
     */
    @NotBlank(message = "中图片不能为空", groups = DefaultGroup.class)
    @Size(max = 200, message = "中图片长度不能超过{max}位", groups = DefaultGroup.class)
    private String middlePic;
    /**
     * 下图片
     */
    @NotBlank(message = "下图片不能为空", groups = DefaultGroup.class)
    @Size(max = 200, message = "下图片长度不能超过{max}位", groups = DefaultGroup.class)
    private String downPic;
    /**
     * 文字说明
     */
    @Size(max = 1000, message = "文字说明长度不能超过{max}位", groups = DefaultGroup.class)
    private String note;
    /**
     * 背景色
     */
    @NotBlank(message = "背景色不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "背景色长度不能超过{max}位", groups = DefaultGroup.class)
    private String bgColor;
    /**
     * 按钮颜色
     */
    @NotBlank(message = "按钮颜色不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "按钮颜色长度不能超过{max}位", groups = DefaultGroup.class)
    private String btColor;

    @Override
    public void freeData() {
        this.cid = null;
        this.pic = null;
        this.middlePic = null;
        this.downPic = null;
        this.note = null;
        this.bgColor = null;
        this.btColor = null;
        super.freeData();
    }
}
